package com.ku.pksu.bornegaarden.info;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;

import com.ku.pksu.bornegaarden.R;

public class Info extends ActivityGroup implements OnClickListener {

	private WebView wv;
	private String url;

	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.info);

	    Intent i = getIntent();
	    if (i != null){
	    	url = i.getStringExtra("Data");
	    }
	    
	    wv = (WebView)findViewById(R.id.info_webView);
//	    wv.loadData(data, "text/html", "UTF-8");
//	        getFileStreamPath("ledelse36.html");
	    wv.loadUrl("file:///" + getFileStreamPath(url));
	    wv.setHorizontalScrollBarEnabled(false);
	}

	@Override
	public void onClick(View v) {
		switch(v.getId()){
//		case R.id.info_button1:
//			Intent i = new Intent(this, Laereplan.class);
//			ActivityStack activityStack = (ActivityStack) getParent();
//	        activityStack.push("SecondStackActivity", i);
		}
	}

}
